/**
 * @see [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/api/location.html#wxopenlocationobject)
 */
export default function open_location(latitude: number, longitude: number, scale?: number, name?: string, address?: string) {
	return new Promise<boolean>((resolve, reject) => {
		wx.openLocation({
			address,
			latitude,
			longitude,
			name,
			scale,
			success() {
				resolve(true);
			},
			fail(e) {
				reject(e);
			}
		});
	});
}
